﻿@model BlogAug22.Models.MyPost

<h2>Edit Post</h2>
<div class="panel panel-default">
    <div class="panel-body">
        <div class="col-md-offset-3 col-md-6">
            <form method="post">
                @Html.HiddenFor(x => x.ID)
                <div class="form-group">
                    <label class="col-sm-2 control-label">Name</label>
                    <div class="col-sm-10">
                        <input type="text" value="@Model.Name" class="form-control" name="name">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">Post</label>
                    <div class="col-sm-10">
                        <input type="text" value="@Model.Post" class="form-control" name="post">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">Blog</label>
                    <div class="col-sm-10">
                        <input type="text" value="@Model.Blog" class="form-control" name="blog" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-10">
                        <input type="submit" value="Save" class="btn btn-block btn-default" />
                    </div>
                </div>
            </form>
            <form method="post" action="/Home/Delete/@Model.ID">
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-10">
                        <input type="submit" value="Delete" class="btn btn-block btn-default" /><br />
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
